<template>
    <el-button class="table-button" type="text" size="small" :icon="icon" :style="{color:color}" @click="handleClick">
        <slot></slot>
    </el-button>
</template>

<script type="text/ecmascript-6">
  /**
   * @author 白雨浓
   * @date 2018/12/8 16:23
   *
   * 列表中的操作按钮
   **/
  export default {
    name: 'TableButton',
    props: {
      icon: {
        type: String
      },
      color: {
        type: String
      }
    },
    methods: {
      handleClick(evt) {
        this.$emit('click', evt);
      }
    }
  }
</script>

<style lang="stylus" rel="stylesheet/stylus" scoped>
    .table-button {
    }
</style>
